package kos.robert.fruits;

import java.awt.*;
import java.util.Random;
import java.util.logging.Logger;

import kos.robert.screens.Screen;

public class AppleLoader {
	private final static Logger logger = Logger.getLogger(AppleLoader.class.getName());

	public static void main(String[] args) {
		logger.info("Program is running");
		String[] appleNames = { "one", "two", "three" };

		GraphicsEnvironment env = GraphicsEnvironment.getLocalGraphicsEnvironment();
		GraphicsDevice vc = env.getDefaultScreenDevice();

		DisplayMode[] dms = vc.getDisplayModes();
		System.out.println("Current display mode:");
		DisplayMode dm = vc.getDisplayMode();
		System.out.println(Screen.displayModeToString(dm));
		System.out.println("Avalible display modes:");
		System.out.println(Screen.displayModeToString(dms));
		System.out.println("Display Change Supported: " + vc.isDisplayChangeSupported());
		System.out.println("Full Screen Supported: " + vc.isFullScreenSupported());

		Thread[] threads = new Thread[3];
		for (int i = 0; i < threads.length; i++) {
			threads[i] = new Thread(new Apple(appleNames[i]));
		}
		for (Thread thread : threads) {
			thread.start();
		}
	}

}
